package com.fc.mall.model;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class OmsOrderGroupBuy implements Serializable {
    private Long id;

    /**
     * 团购信息
     *
     * @mbggenerated
     */
    private Long productGroupId;

    /**
     * 产品信息
     *
     * @mbggenerated
     */
    private Long productId;

    /**
     * 产品名称
     *
     * @mbggenerated
     */
    private String productName;

    /**
     * 产品省略图
     */
    private String pic;

    /**
     * 商品信息
     *
     * @mbggenerated
     */
    private Long skuId;

    /**
     * 商品价格
     *
     * @mbggenerated
     */
    private BigDecimal skuPrice;

    /**
     * 团购价格
     *
     * @mbggenerated
     */
    private BigDecimal groupPrice;

    /**
     * 团购信息
     *
     * @mbggenerated
     */
    private Long ownerId;

    /**
     * 昵称
     *
     * @mbggenerated
     */
    private String nickname;

    /**
     * 头像
     *
     * @mbggenerated
     */
    private String icon;

    /**
     * 状态：1 进行中，
     *
     * @mbggenerated
     */
    private int status;

    /**
     * 创建时间
     *
     * @mbggenerated
     */
    private Integer createTime;

    private Integer expiredTime;

    /**
     * 已参团人数
     */
    private Integer memberCount;

    private List<OmsOrderGroupBuyItem> groupBuyItemList = new ArrayList<>();

    private static final long serialVersionUID = 1L;

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", productGroupId=").append(productGroupId);
        sb.append(", productId=").append(productId);
        sb.append(", productName=").append(productName);
        sb.append(", skuId=").append(skuId);
        sb.append(", skuPrice=").append(skuPrice);
        sb.append(", groupPrice=").append(groupPrice);
        sb.append(", ownerId=").append(ownerId);
        sb.append(", nickname=").append(nickname);
        sb.append(", icon=").append(icon);
        sb.append(", status=").append(status);
        sb.append(", createTime=").append(createTime);
        sb.append(", expiredTime=").append(expiredTime);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}